package com.gopay.common.domain.acps.model;

import java.util.Date;

import org.apache.commons.lang.StringUtils;

import com.gopay.common.domain.BaseEntity;
import com.gopay.common.domain.acps.AcctProd;
import com.gopay.common.domain.acps.AcctStatus;
import com.gopay.common.domain.acps.FrezCode;
import com.gopay.common.domain.acps.PayPasswordStatus;

/**
 * 账务核心处理中心 账户信息
 * 
 * @AcctMast.java
 * @author zhanglei
 * @2012-12-28 上午10:31:48 www.gopay.com.cn Inc.All rights reserved.
 */
@SuppressWarnings("all")
public class AcctMastBean extends BaseEntity {
    
    private static final long serialVersionUID = -7613885507003292453L;
    
    /** 虚拟账号 */
    private String acctId;

    /**
     * 币种
     */
    private String curType;
    /** 账户名 */
    private String acctName;
    /** 账户状态 */
    private AcctStatus accStatus;
    private String accStatusStr;
    /** 账户产品代码 */
    private AcctProd prodCode;    
    private String prodCodeStr;    
    /** 冻结码 */
    private FrezCode frezCode;
    private String frezCodeStr;
    /** 冻结原因 */
    private String frezReasonCode;
    /** 客户ID */
    private String custId;
    /** 余额 */
    private String balAmt;
    /** 可用余额 */
    private String avaAmt;
    /** 冻结金额 */
    private String frezAmt;
    /** 支付密码 */
    private String payPwd;
    /** 支付密码状态 */
    private PayPasswordStatus payPwdStatus;
    /** 支付密码状态String值:因为hessian传枚举有时候会报错；见bug7104 */
    private String payPwdStatusStr;
    /** 当日密码错误次数 */
    private int todayPwdErrNum;
    /** 累计密码错误次数 */
    private int totalPwdErrNum;
    /** 支付密码安全问题 */
    private String payQus;
    /** 支付密码安全问题答案 */
    private String payQusAnswer;
    /** 开通日期 */
    private Date acctOpnDate;

    public String getProdCodeStr() {
        return prodCodeStr;
    }

    public void setProdCodeStr(String prodCodeStr) {
        this.prodCodeStr = prodCodeStr;
    }

    public String getFrezCodeStr() {
        return frezCodeStr;
    }

    public void setFrezCodeStr(String frezCodeStr) {
        this.frezCodeStr = frezCodeStr;
    }
    public String getAccStatusStr() {
        return accStatusStr;
    }

    public void setAccStatusStr(String accStatusStr) {
        this.accStatusStr = accStatusStr;
    }

    public String getAcctId() {
        return acctId;
    }

    public void setAcctId(String acctId) {
        this.acctId = acctId;
    }

    public String getAcctName() {
        return acctName;
    }

    public void setAcctName(String acctName) {
        this.acctName = acctName;
    }

    public String getCustId() {
        return custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    public String getBalAmt() {
        return balAmt;
    }

    public void setBalAmt(String balAmt) {
        this.balAmt = balAmt;
    }

    public String getAvaAmt() {
        return avaAmt;
    }

    public void setAvaAmt(String avaAmt) {
        this.avaAmt = avaAmt;
    }

    public String getFrezAmt() {
        return frezAmt;
    }

    public void setFrezAmt(String frezAmt) {
        this.frezAmt = frezAmt;
    }

    public String getPayPwd() {
        return payPwd;
    }

    public void setPayPwd(String payPwd) {
        this.payPwd = payPwd;
    }

    public String getPayQus() {
        return payQus;
    }

    public void setPayQus(String payQus) {
        this.payQus = payQus;
    }

    public AcctStatus getAccStatus() {
        try {
            AcctStatus e = AcctStatus.valueOf(accStatusStr);
            return e;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public void setAccStatus(AcctStatus accStatus) {
        this.accStatus = accStatus;
    }

    public FrezCode getFrezCode() {
        if(StringUtils.isBlank(frezCodeStr)){
            return null;
        }
        try {
            FrezCode e = FrezCode.valueOf(frezCodeStr);
            return e;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public void setFrezCode(FrezCode frezCode) {
        this.frezCode = frezCode;
    }

    public String getFrezReasonCode() {
        return frezReasonCode;
    }

    public void setFrezReasonCode(String frezReasonCode) {
        this.frezReasonCode = frezReasonCode;
    }

    public AcctProd getProdCode() {
        try {
            AcctProd e = AcctProd.valueOf(prodCodeStr);
            return e;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public void setProdCode(AcctProd prodCode) {
        this.prodCode = prodCode;
    }

    public PayPasswordStatus getPayPwdStatus() {
        try {
            PayPasswordStatus e = PayPasswordStatus.valueOf(payPwdStatusStr);
            return e;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public void setPayPwdStatus(PayPasswordStatus payPwdStatus) {
        this.payPwdStatus = payPwdStatus;
    }

    public int getTodayPwdErrNum() {
        return todayPwdErrNum;
    }

    public void setTodayPwdErrNum(int todayPwdErrNum) {
        this.todayPwdErrNum = todayPwdErrNum;
    }

    public int getTotalPwdErrNum() {
        return totalPwdErrNum;
    }

    public void setTotalPwdErrNum(int totalPwdErrNum) {
        this.totalPwdErrNum = totalPwdErrNum;
    }

    public String getCurType() {
        return curType;
    }

    public void setCurType(String curType) {
        this.curType = curType;
    }

    public String getPayQusAnswer() {
        return payQusAnswer;
    }

    public void setPayQusAnswer(String payQusAnswer) {
        this.payQusAnswer = payQusAnswer;
    }

    public Date getAcctOpnDate() {
        return acctOpnDate;
    }

    public void setAcctOpnDate(Date acctOpnDate) {
        this.acctOpnDate = acctOpnDate;
    }

    public String getPayPwdStatusStr() {
        return payPwdStatusStr;
    }

    public void setPayPwdStatusStr(String payPwdStatusStr) {
        this.payPwdStatusStr = payPwdStatusStr;
    }

}
